package cn.kgc.service.impl;


import cn.kgc.dao.DealerMapper;
import cn.kgc.pojo.Dealer;
import cn.kgc.service.DealerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class DealerServiceImpl implements DealerService {
    @Resource
    private DealerMapper dealerMapper;

    @Override
    public List<Dealer> queryAllDealer(String dealerName, String dealerCode) {
        return dealerMapper.queryAllDealer(dealerName, dealerCode);
    }

    @Override
    public Integer updateDealer(Dealer dealer) {
        return dealerMapper.updateDealer(dealer);
    }

    @Override
    public Integer addDealer(Dealer dealer) {
        return dealerMapper.addDealer(dealer);
    }

    @Override
    public Dealer queryByIdDealer(String id) {
        return dealerMapper.queryByIdDealer(id);
    }

    @Override
    public Integer deleteDealer(String dealerId) {
        return dealerMapper.deleteDealer(dealerId);
    }

}
